package com.example.liuxing.jdmall.db;


import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by liuxing on 2017/7/19.
 */

public class DbOpenHelp extends SQLiteOpenHelper {

    public DbOpenHelp(Context context) {
        super(context, DbCons.DB_NAME, null, DbCons.DB_Version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("create table " + DbCons.USER_TABLE+"(" +
                DbCons._ID+" integer primary key autoincrement," +
                DbCons._NAME+" text, " +
                DbCons._PWD+" text);");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    }

}
